{block name=report-classes}
<div class="row form">
  <form class="form" role="form" id="filter-form" action="/admin/includes/processes/processes-reports.php">
    {include file='reports/input/input-classlist.tpl'}
    <div class="form-group">
      <div class="row">
        <div class="col-sm-12">
        <input type="hidden" name="action" value="approvedenrolmentslist" />
    <a href="javascript:void(0);" onClick="loadApprovedReport($(this).closest('form'));" class="btn btn-info" style="margin-left: 10px;">Report Now</a>
    </div>
     </div>
    </div>
  </form>
</div> 
<div class="row form" id="approvedenrolmentslist-report"></div>
<script type="text/javascript">
function loadApprovedReport(form) {
    $('body').css('cursor', 'wait');
    $('#approvedenrolmentslist-report').html('');
    $.ajax({
      type : "POST",
      url : "/admin/includes/processes/processes-reports.php",
      cache : false,
      data : $(form).serialize(),
      dataType : "json",
      success : function(data, textStatus) {
        try {
          $('#approvedenrolmentslist-report').prepend(data['html']);
          eval(data['javascript']);
          $('body').css('cursor', 'default');
        } catch (err) {
          $('body').css('cursor', 'default');
        }
      }
    });
}

</script>
{/block} 


